<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class TDevicecontrol extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_devicecontrol', function (Blueprint $table) {
             $table->engine = 'MyISAM';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->increments('dc_index')->nullable(false)->comment('');
			$table->unsignedInteger('pdi_index')->nullable(false)->default(0)->comment('');
			$table->datetime('dc_datetime0')->nullable()->default(null)->comment('');
			$table->datetime('dc_datetime1')->nullable()->default(null)->comment('');
			$table->integer('Dc_status')->nullable()->default(null)->comment('');
			$table->char('dc_username', 30)->nullable()->default(null)->comment('');
			$table->integer('dc_userid')->nullable()->default(null)->comment('');
			$table->char('dc_in_name', 30)->nullable()->default(null)->comment('');
			$table->integer('dc_count')->nullable()->default(0)->comment('');
			$table->unique('dc_index', 'dc_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_devicecontrol');
    }
}
